package com.qianfeng.pojo;


import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.qianfeng.status.ResultCode;
import com.qianfeng.valigroup.Delete;
import com.qianfeng.valigroup.Insert;
import com.qianfeng.valigroup.Select;
import com.qianfeng.valigroup.UpDate;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
public class SysCategory implements Serializable {

    @NotNull(groups = {Select.class,UpDate.class, Delete.class}, message = "{\"code\": " + ResultCode.PARAM_CONTENT_EMPTY + ",\"msg\": \"未接收到分类Id\"}")
    private long cid;

    @NotEmpty(groups = Insert.class, message = "{\"code\":" + ResultCode.PARAM_CONTENT_EMPTY + ",\"msg\":\"没有传递分类名称\"}")
    private String categoryName;

    private String txCommand;

    private String rxCommand;

    private String commandName;

    private long status;
    @JsonIgnore
    private Date createTime;
    @JsonIgnore
    private String createBy;
    @JsonIgnore
    private Date updateTime;

    @JsonIgnore
    private String updateBy;


    public long getCid() {
        return cid;
    }

    public void setCid(long cid) {
        this.cid = cid;
    }


    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }


    public String getTxCommand() {
        return txCommand;
    }

    public void setTxCommand(String txCommand) {
        this.txCommand = txCommand;
    }


    public String getRxCommand() {
        return rxCommand;
    }

    public void setRxCommand(String rxCommand) {
        this.rxCommand = rxCommand;
    }


    public String getCommandName() {
        return commandName;
    }

    public void setCommandName(String commandName) {
        this.commandName = commandName;
    }


    public long getStatus() {
        return status;
    }

    public void setStatus(long status) {
        this.status = status;
    }


    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(java.sql.Timestamp createTime) {
        this.createTime = createTime;
    }


    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }


    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(java.sql.Timestamp updateTime) {
        this.updateTime = updateTime;
    }


    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

}
